import { defineStore } from 'pinia'
import type {UserVO} from "../../generated";


export const useUserStore = defineStore('user', {
    state: () => ({
        user: null as UserVO | null // 最好明确类型
    }),
    actions: {
        login(userInfo: UserVO) {
            this.user = userInfo
        },
        logout() {
            this.user = null
        }
    }
})
